import storageApi from '../../../core/storage/storage';

function supervisorNoticesController($rootScope, $scope, noticeService) {
  'ngInject';

  this.query = () => {
    this.hasData = false;
    const param = {
      page: 1,
      size: 5,
      mapParams: {},
    };
    noticeService
      .query(param)
      .then((res) => {
        if (res.success) {
          this.noticeList = res.rows;
          if (this.noticeList && this.noticeList.length > 0) {
            this.hasData = true;
          }
        }
      });
  };

  this.query();
}

export default supervisorNoticesController;
